package online.xybh.qa.Enum;

public enum subjectEnum {
    CHINESE(1, "语文"), MATH(2, "数学"), ENGLISH(3, "英语"), PROGRAM(4, "编程");
    private Integer code;
    private String message;

    subjectEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public static String getMessage(Integer code) {
        if (code.equals(CHINESE.code)) {
            return CHINESE.message;
        } else if (code.equals(MATH.code)) {
            return MATH.message;
        } else if (code.equals(ENGLISH.code)) {
            return ENGLISH.message;
        } else if (code.equals(PROGRAM.code)) {
            return PROGRAM.message;
        }
        return null;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }


}
